﻿using System;

namespace Oxage.CNC.Hardware
{
	/// <summary>
	/// Implements a message encoder and decoder for communication channel.
	/// </summary>
	public interface IMachineMessageSerializer
	{
		/// <summary>
		/// When implemented builds raw data.
		/// </summary>
		/// <returns></returns>
		byte[] Serialize();

		/// <summary>
		/// When implemented sets raw data to be parsed.
		/// </summary>
		/// <param name="data"></param>
		void Deserialize(byte[] data);
	}
}
